home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- myModeless.c
-
- Handle a Demo Modeless Dialog Box
-
- Copyright 1988 Gregory H. Dow. All Rights Reserved.
-
- ******************************************************************************/
-
- #ifndef _DialogMgr_
- #include <DialogMgr.h>
- #endif
-
- #ifndef _EventMgr_
- #include <EventMgr.h>
- #endif
-
- #include "Common.h"
- #include "CModelessDlog.h"
-
-
- void DoDemoFilter(theDialog, theEvent)
- DialogPtr theDialog;
- EventRecord *theEvent;
- {
- if (theEvent->what == keyDown) {
- if ((theEvent->message & charCodeMask) == '\r')
- theEvent->what = nullEvent;
- }
- }
-
-
- /******************************************************************************
- DoDemoModeless
-
- Handle a modeless dialog box
- ******************************************************************************/
-
- void DoDemoModeless(theMDobj, itemHit, theEvent)
- ModelessDlogObjH theMDobj;
- short itemHit;
- EventRecord *theEvent;
- {
- DialogPtr theDialog;
-
- theDialog = (**theMDobj).theWPtr;
- if (itemHit == 1)
- SelIText(theDialog, 3, 0, MAXINT);
- }